package com.atguigu.springcloud.service;

import com.atguigu.springcloud.entities.CommentResult;
import com.atguigu.springcloud.entities.Payment;
import feign.Param;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

@FeignClient(value = "CLOUD-PAYMENT-SERVICE")
@Component
public interface PaymentFeignService {
    @PostMapping("/cretePayment")
    CommentResult<Integer> create(Payment payment);
    @GetMapping("/getPaymentById/{id}")
    CommentResult<Payment> getPaymentById(@PathVariable("id") Long id);
}
